<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<script language="javascript" type="text/javascript">

$(document).ready(function(){

	$.post("<%=basePath%>queryPrice_getCountrys.action",{"q_name":""},function(data){
			var pro = document.getElementById("countrylist");
			pro.options.length = 1;
				$(data.allCountrys).each(function(){
					pro.options.add(new Option(this.clinentCountryCn,this.clinentCountryCode));
				})
		});
		
	$("#countryKey").change(function(){
		$.post("<%=basePath%>queryPrice_getCountrys.action",{"q_name":this.value},function(data){
			var pro = document.getElementById("countrylist");
			pro.options.length = 1;
				$(data.allCountrys).each(function(){
					pro.options.add(new Option(this.clinentCountryCn,this.clinentCountryCode));
				})
		});
	});



	});

</script>
<div class="pageContent">
	<form method="post" action="<%=basePath%>port_addPort.action" class="pageForm required-validate" onsubmit="return validateCallback(this,navTabAjaxDone)">
			<div><label>&nbsp;</label></div>
			<label>&nbsp;&nbsp;&nbsp;&nbsp;所属国家：&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>
				<input id="countryKey" alt="输入国家编码或中英名" class="" type="text"/>
				<select id="countrylist" name="port.clinentCountryCode" class="required">
					<option value="">请选择所属国家</option>
				</select>
		<div class="pageFormContent1" layoutH="90" style="width: 500px">
			<p>
				<label>港口名：</label>
				<input name="port.portName" value="${port.portName}" class="required" type="text"/>
			</p>
			<p style="color: red;">
				${hrProtName}
			</p>
			<p>
			<label>城市名：</label>
			<input name="port.portCity" value="${port.portCity}" class="required" type="text" />
			</p>
			<p style="color: red;">
			</p>
			<p>
			<label>三字代码：</label>
			<input name="port.portCode" value="${port.portCode}" class="required lettersonly" type="text" />
			</p>
			<p style="color: red;">
				${hrProtCode}
			</p>
			<p>
			<label>分类：</label>
				<select name="port.portClass" class="required">
				    <option value="">请选择分类</option>
					<option value="OS">海运</option>
					<option value="AR">空运</option>
				</select>
			</p>
			
			
			
		</div>
		<div class="formBar">
			<ul>

				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">添加</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>
